import request from '@/utils/request'

const api_name = '/monitor/rules/'

export default {
  // allRulesByTableName(db_name,table_name) {
  //   return request({
  //     url: `api/rules/queryAllRulesCollection/${db_name}/${table_name}`,
  //     method: 'get'
  //   })
  // },
  getMonitorHiveMetaByTableName(db_name,table_name) {
    return request({
      url: `/monitor/hiveMetaStore/${db_name}/${table_name}/detail`,
      method: 'get'
    })
  },

  deleteOneRuleById(id) {
    return request({
      url: `/monitor/rules/deleteOneRuleById/${id}`,
      method: 'get'
    })
  },
  oneRuleById(id) {
    return request({
      url: `/monitor/rules/query/oneRuleById/${id}`,
      method: 'get'
    })
  },
  updateOneRule(data){
    return request({
      url: `/monitor/rules/updateOneRule/`,
      method: 'post',
      data: data
    })
  }
}
